import request from '@/utils/request'
// 供应商
// /purchase/supplier/list?size=5&current=1
export function getsupplierAll(data){
  return request({
    url:"/purchase/supplier/list?size=5&current=1",
    method:"post",
    data
  })
}

// /purchase/supplier/del/3
export function delsupplier(id){
  return request({
    url:"/purchase/supplier/del/"+id,
    method:"post"
  })
}

// /purchase/supplier/add
// {"name":"优选公司", "code": "004", "remarks": "长期", "wsId": 1}
export function addsupplier(data){
  return request({
    url:"/purchase/supplier/add",
    method:"post",
    data
  })
}

// /purchase/supplier/edit
// {"id":3 ,"name":"赵子龙", "code": "0041", "remarks": "王牌采购", "wsId": 1}
export function editsupplier(data){
  return request({
    url:"/purchase/supplier/edit",
    method:"post",
    data
  })
}

// 获取所有的用户列表
export function listsysusers(){
  return request({
    url:"/systemUser/findpage/1/1000",
    method:"get"
  })
}
// 获取所有的用户列表
export function listsysusersss(params){
  return request({
    url:"/systemUser/findSupplierUser",
    method:"get",
    params
  })
}

// 获取所有的用户列表
export function bindsysuser(data){
  return request({
    url:"/purchase/supplier/bind",
    method:"post",
    data
  })
}

// 获取供应商的详情
export function getsupplierinfo(data){
  return request({
    url:"/purchase/supplier/detail",
    method:"post",
    data
  })
}

// 获取所有的用户状态值
export function getstatusenum(){
  return request({
    url:"/purchase/supplier/state/enum",
    method:"get"
  })
}


export function changeSupplierStatus(data){
  return request({
    url:"/purchase/supplier/state",
    method:"post",
    data
  })
}
//供应商财务列表。
export function bindingFinanceAccount(params){
  return request({
    url:'/systemUser/findSupplierBusinessUser',
    method:'get',
    params
  })
}